#pragma once
/*
 * 功能服务接口
 * Procedure Service(PS)
 */

/*
 * Monitor接口
 */
struct IPSEvent
{
	virtual int		GetEventFd() = 0;
	virtual void	OnEventIn() = 0;
	virtual void	OnEventOut() = 0;
	virtual void	OnEventPri() = 0;
	virtual void	OnEventError() = 0;
};

struct IPSMonitor
{
	virtual bool	AddMonitor(IPSEvent* p, int events) = 0;
	virtual bool	DelMonitor(IPSEvent* p) = 0;
	virtual bool	ModMonitor(IPSEvent* p, int events) = 0;
};

/*
 * 服务接口
 */
struct IPSClientContext;
struct IPSServerContext
{
	virtual bool	FindClient(unsigned int id, IPSClientContext** pContext) = 0;
};

/*
 * 服务上下文接口
 */
struct IPSServer : virtual public IPSServerContext, virtual public IPSEvent
{
};

/*
 * 客户连接接口
 */
struct IPSClientContext
{
};

struct IPSClient : virtual public IPSClientContext, virtual public IPSEvent
{
	virtual long	AddRef() = 0;
	virtual long	Release() = 0;
};


